<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="commons :: head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>搜索结果</title>
<!--    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">-->
<!--    <link rel="stylesheet" th:href="@{/css/semantic.min.css}">-->
<!--    <link rel="stylesheet" th:href="@{/css/style.css}">-->
</head>
<body>

    <!--头部导航开始-->
    <!--thymeleaf 片段替换-->
    <div th:replace="commons :: header(null)"></div>
    <!--头部导航结束-->

    <!--中间部分开始-->
    <div class="v-container-small v-padded-tb-big">
        <div class="ui container">
            <!--头部分类-->
            <div class="ui top attached segment">
                <div class="ui middle aligned two column grid">
                    <div class="column">
                        <h3 class="ui teal header">搜索结果</h3>
                    </div>

                    <div class="right aligned column">
                        共 <h2 class="ui orange header v-inline-block v-text-thin" th:text="${page.totalElements}"> 15 </h2> 个
                    </div>
                </div>
            </div>

            <!--文章列表-->
            <div class="ui top attached teal segment">
                <div class="ui padded vertical segment v-padded-tb-large" th:each="blog : ${page.content}">
                    <div class="ui middle aligned mobile reversed stackable grid">

                        <div class="eleven wide column">
                            <h3 class="ui header"><a th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" th:text="${blog.title}" class="v-black">你真的理解什么是财富自由吗？</a></h3>
                            <!--字符串连接-->
                            <p class="v-text" th:text="|${blog.description}......|">正确做好任何一件事情的前提是清晰、正确的理解目标。而事实是，我们很多人很多时候根本没有对目标正确的定义，甚至根本从来就没有想过，只是大家都那么做而已…...</p>

                            <div class="ui stackable grid">
                                <div class="eleven wide column">
                                    <div class="ui mini horizontal link list">
                                        <div class="item">
                                            <img th:src="@{${blog.user.avatar}}" src="https://picsum.photos/id/1027/100/100" alt="头像" class="ui avatar image">
                                            <div class="content">
                                                <a th:text="${blog.user.nickname}" href="#" class="header">veo</a>
                                            </div>
                                        </div>
                                        <div class="item">
                                            <i class="calendar icon"></i><span th:text="${#dates.format(blog.updatedTime,'yyyy-MM-dd')}">2021-01-25</span>
                                        </div>
                                        <div class="item">
                                            <i class="eye icon"></i><span th:text="${blog.views}">2345</span>
                                        </div>

                                    </div>
                                </div>
                                <div class="right aligned five wide column">
                                    <a href="#" target="_blank" class="ui teal basic label v-padded-tiny v-text-thin" th:text="${blog.type.name}">认知升级</a>
                                </div>
                            </div>
                        </div>

                        <div class="five wide column">
                            <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
                                <img th:src="@{${blog.firstPicture}}" src="https://picsum.photos/id/1027/800/400" alt="博客图片" class="ui rounded image">
                            </a>
                        </div>
                    </div>
                </div>

            </div>

            <div class="ui bottom attached segment">
                <div class="ui middle aligned two column grid">
                    <div class="column">
                        <a th:href="@{/(page=${page.number} - 1)}" th:unless="${page.first}" class="ui mini teal basic button">上一页</a>
                    </div>

                    <div class="right aligned column">
                        <a th:href="@{/(page=${page.number} + 1)}" th:unless="${page.last}" class="ui mini teal basic  button">下一页</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--中间部分结束-->
    <br>
    <br>
    <br>
    <br>

    <!--底部部分开始-->
    <!--thymeleaf 片段替换-->
    <div th:replace="commons :: #footer"></div>
    <!--底部部分结束-->

<!--<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>-->
<!--<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>-->
<!--<script th:src="@{/js/jquery-3.6.0.min.js}"></script>-->
<!--<script th:src="@{/js/semantic.min.js}"></script>-->

<!--/*/<th:block th:replace="commons :: script">/*/-->
    <!--thymeleaf 引入js资源，这三行不为注释-->
<!--/*/</th:block>/*/-->
<script>
    $('.menu.toggle').click(function () {
        $('.v-item').toggleClass('v-mobile-hidden')
    });
</script>
</body>
</html>

